<div class="dmtin">
    <span><a href="<?= url_create('site', 'ViewCatalogue', 'index', $catalogue->id, $catalogue->info[$lang]->name) ?>"><?= $catalogue->info[$lang]->name ?></a></span>
</div>
<div class="clear"></div>
<div id="left_content">
    <div class="tit_tin"><?= $page->title ?></div>
    <div class="mota_tin"><?= $page->summary ?></div>
    <div class="chitiet_tin">
		<?= htmlspecialchars_decode($page->content) ?>
	</div>
    <br clear="all">
	<? if($page->product){ ?>
		<button class="btn btn-success btn-large pull-right<? if($page->registed) echo " disabled";?>" id="registerPackage"><?= lang('Register') ?></button>
		<br/>
		<br/>
		<br/>
		<script>
			$('#registerPackage').click(function() {
				$.ajax({
					url: '<?= url_create('site', 'ViewPage', 'register') ?>',
					dataType: 'json',
					type: 'post',
					data: {
						page_id: <?= $page->id ?>
					},
					success: function(o) {
						if(o.state=='success')
							$('#registerPackage').addClass('disabled');
						alert(o.message);
					}
				});
			})

		</script>
	<? } ?>

	<div class="fb-comments" data-href="<?= base_url('page/' . $page->id) ?>" data-width="650"></div>
	<? if(count($others) > 0){ ?>
		<div class="tintt"><?= lang('other_pages') ?></div>
		<div class="list_news">
			<ul>
				<? foreach($others as $page){ ?>
					<li>
						<a href="<?= url_create('site', 'ViewPage', 'index', $page->id, $page->title) ?>"><?= $page->title ?> (<?= time2str($page->time) ?>)</a></li>
				<? } ?>
			</ul>
		</div>
	<? } ?>
</div>